wayland: Fix dnd hotspot movement
authorAlexander Mikhaylenko <alexm@gnome.org>
Wed, 26 Aug 2020 23:04:48 +0000 (04:04 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Wed, 26 Aug 2020 23:04:48 +0000 (04:04 +0500)
_gdk_wayland_surface_offset_next_wl_buffer() moves the surface relatively
to its current position, pass it a delta instead of new position.

gdk/wayland/gdkdrag-wayland.c

index 05bf681717787bfa0747cf9f78d709c8185c2603..de80afe020a31da5cd091dc34f4afe99eefbca48 100644 (file)
@@ -137,7 +137,7 @@ gdk_wayland_drag_set_hotspot (GdkDrag *drag,
     return;
 
   _gdk_wayland_surface_offset_next_wl_buffer (drag_wayland->dnd_surface,
-                                             -hot_x, -hot_y);
+                                             prev_hot_x - hot_x, prev_hot_y - hot_y);
   gdk_surface_invalidate_rect (drag_wayland->dnd_surface, &damage_rect);
 }